﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;

public class TriggerLoadScene : MonoBehaviour
{

    [Header("下一个场景")]
    public string next_scene;
    [Header("门pre_door")]
    public string pre_door;

    void OnTriggerEnter2D(Collider2D other)
    {
        // characterInQuicksand = true;
       // Debug.Log("TARGGERED" + NextSceneName);
        //AsyncLoadSceneCallBack.StartAsyncLoadSceneCoroutine(NextSceneName);

        if (other.name.Contains("Player"))
        {

            SceneLoadManager.Instance.Set_Prev_Door(pre_door);

            SceneLoadManager.Instance.LoadNext(next_scene);


        }
    }


}

